Texture2D InputTexture;
SamplerState InputSampler
{
	Filter   = MIN_MAG_MIP_LINEAR;
	AddressU = Clamp;
	AddressV = Clamp;
};
float2 TexelRange;

struct VS_IN
{
	float4 pos : POSITION;
	float2 tex : TEXCOORD;
};

struct PS_IN
{
	float4 pos : SV_POSITION;
	float2 tex : TEXCOORD;
};


PS_IN VS( VS_IN input )
{
	PS_IN output = (PS_IN)0;
	
	output.pos = input.pos;
	output.tex = input.tex * TexelRange;
	
	return output;
}

float4 PS( PS_IN input ) : SV_Target
{
	return InputTexture.Sample(InputSampler, input.tex);
}

technique11 Render
{
	pass P0
	{
		SetVertexShader( CompileShader( vs_4_0_level_9_1, VS() ) );
		SetGeometryShader( 0 );
		SetPixelShader( CompileShader( ps_4_0_level_9_1, PS() ) );
	}
}